class Solution {
private:
    vector<string> ans;
    vector<int>real_ans;
    void dfs(string& front, int n){
        if(!n){
            ans.push_back(front);
            return;
        }
        for(int i = 0; i <= 9; i++){
            front += '0' + i;
            dfs(front, n - 1);
            front.pop_back();
        }
    }
public:
    vector<int> printNumbers(int n) {
        string temp = "";
        dfs(temp, n);
        for(int i = 1; i < ans.size(); i++){
            real_ans.push_back(atoi(ans[i].c_str()));
        }
        return real_ans;
    }
};
//2021.4.10 
